abstract class Shape {
    abstract public void draw();
    abstract void calcArea();

    public double getArea() {
        return area;
    }

    protected double area;
}

class Rect extends Shape {
    private double length;
    private double width;

//    class A {
//        public double getlength() {
//            return length;
//        }
//    }
    public Rect(double length, double width) {
        this.length = length;
        this.width = width;
    }

    @Override
    public void draw() {

        System.out.println("矩形：length=" + length + " width=" + width);

    }

    @Override
    void calcArea() {
        area = length * width;

    }
}

class Circle extends Shape {


    private double r;
    final  private static double PI = 3.14;

    public Circle(double r) {
        this.r = r;
    }
    @Override
    public void draw() {
        System.out.println("圆:r = " + r);
    }

    @Override
    void calcArea() {

        area = PI * r * r;
    }
}

public class Demo {
}
